<?php

class PasswordConfirmationForm extends Block{
	public $templatePath = __DIR__ ;
	public $templateFile = "PasswordConfirmationForm.tpl.std.html";
	public $caption = "Password and Confirmation";
	public $description="Write your password and Confirmation";
	public $password="";
	public $confirm="";
	public $language="en_US";
	
	
	
	public function show(){
		
		$this->parseFromFile($this->templatePath."/".$this->templateFile);
		
		$this->password = isset($_REQUEST[$this->oid]['password'])?$_REQUEST[$this->oid]['password']:"";
		$this->confirm  = isset($_REQUEST[$this->oid]['confirm'])?$_REQUEST[$this->oid]['confirm']:"";
		
		return $this->replace();
	}
	
	public function translate($literal=""){
		
		$literal=trim($literal);
		$dic['es_ES']=array(
			'Password'=>'Contraseña'
			,'Repeat password'=>'Repetir contraseña'
			,'Password and Confirmation'=>'Contraseña y confirmación'
			,'Write your password and Confirmation' => 'Escriba su contraseña y luego vuelva a escribirla para confirmarla.'
			,'Good Password' => 'Buena!'
		);
		$dic['en_US']=array();
		
		if(isset($this->language)){
			if(isset($dic[$this->language][$literal])){
				return $dic[$this->language][$literal];
			}
		}
		return $literal;
	}
}

?>